package Hook::Modular::Rule::Expression;

use warnings;
use strict;
use base 'Hook::Modular::Rule';


our $VERSION = '0.07';


sub dispatch {
    my($self, $args) = @_;
    my $status = eval $self->{expression};
    if ($@) {
        Hook::Modular->context->log(error =>
            "Expression error: $@ with '$self->{expression}'"
        );
    }
    $status;
}


1;


__END__

{% USE p = PodGenerated %}

=head1 NAME

{% p.package %} - Expression-based rule dispatcher

=head1 SYNOPSIS

    {% p.package %}->new;

=head1 DESCRIPTION

None yet.

{% PROCESS standard_pod %}

=cut

